/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.mapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ykht.proj.coupon.entity.FxRewardPerson;
import com.ykht.proj.coupon.entity.FxWithdrawalPerson;
import com.ykht.proj.coupon.vo.FXRewardPersonLogVo;
import com.ykht.proj.coupon.vo.FxRewardPersonVo;
import com.ykht.proj.coupon.vo.FxRewardPersonVo4C;
import com.ykht.proj.coupon.vo.MyFy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * c端奖励记录表
 *
 * @author proj code generator
 * @date 2021-08-12 14:10:39
 */
@Mapper
public interface FxRewardPersonMapper extends BaseMapper<FxRewardPerson> {


	@SqlParser(filter=true)
	Page<MyFy> myFys(Page page, @Param("personId") Long personId);

	/**
	 * 分页查询 c端奖励记录表
	 *
	 * @param page             分页对象
	 * @param fxRewardPersonVo c端奖励记录表
	 * @return
	 */
    IPage<FxRewardPersonVo> getFxRewardPersonPage(Page page, @Param("req") FxRewardPersonVo fxRewardPersonVo);

	/**
	 * 分页查询 品牌的消费记录表
	 *
	 * @param page             分页对象
	 * @param fxRewardPersonVo c端奖励记录表
	 * @return
	 */
	IPage<FxRewardPersonVo> getBrandConsumptionPage(Page page, @Param("req") FxRewardPersonVo fxRewardPersonVo);

	BigDecimal sumMuney(@Param("status") Integer status,@Param("personId") Long loginId);

	Page<FxRewardPersonVo4C> rewardPerson4CPage(Page page, @Param("req")FxWithdrawalPerson withdrawalPerson);

	List<FxRewardPersonVo> getBrandConsumptionPage(@Param("req")FxRewardPersonVo fxRewardPersonVo);

    FXRewardPersonLogVo selectMoeny();

	void updateReward(int shopType, Long sjId);

	List<FxRewardPersonVo> getExport();
}
